using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Input;
using System.Windows.Threading;
using Giraffe.Client.Common.WindowsController;
using Giraffe.Core.Common;

namespace Giraffe.Client.Common
{
    public abstract class ViewModelBase: INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;

        protected void RisePropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        protected Dispatcher Dispatcher
        {
            get
            {
                return ObjectProvider.Resolve<IApplicationProxy>().UIDispatcher;
            }
        } 
    }
}